package com.atqinke.designpattern.behavioraltype.state.stateplus;

/**
 * @BelongsProject: BasicConnection
 * @BelongsPackage: com.atqinke.designpattern.behavioraltype.state.stateplus
 * @Author: NieHk
 * @CreateTime: 2022-08-29  10:06
 * @Description: 停止状态
 * @Version: 1.0
 */
public class StoppingState extends LiftState {

    @Override
    public void open() {

        super.context.setLiftState(Context.openningState);

        super.context.getLiftState().open();
    }

    @Override
    public void close() {
        System.out.println("电梯已停止,无法关闭");
    }

    @Override
    public void run() {

        super.context.setLiftState(Context.runningState);

        super.context.getLiftState().run();
    }

    @Override
    public void stop() {
        System.out.println("电梯已停止...");
    }
}
